//
//  ZXZMyCell.m
//  sheyingzu
//
//  Created by tyu on 29.5.24.
//

#import "ZXZMyCell.h"

@interface ZXZMyCell ()

@property(weak,nonatomic)UIView *ContentV;

@property(weak,nonatomic)UIButton *BTNBTN;
@property(weak,nonatomic)UIImageView *ImgV;

@end

@implementation ZXZMyCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self SetupUI];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self SetupFrame];
}

- (void)SetupUI {
    UIView *ContentV = [[UIView alloc]init];
    self.ContentV = ContentV;
    [self addSubview:ContentV];
    ContentV.backgroundColor = [UIColor whiteColor];

    UIImageView *ImgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"go"]];
    [ContentV addSubview:ImgV];
    self.ImgV = ImgV;

    UILabel *TitleLab = [[UILabel alloc]init];
    [self.ContentV addSubview:TitleLab];
    self.TitleLab = TitleLab;
    TitleLab.font = [UIFont systemFontOfSize:15 weight:(UIFontWeightMedium)];
    TitleLab.textColor = [UIColor blackColor];
    TitleLab.text = @"幸运儿";

    UIButton *BTNBTN = [UIButton buttonWithType:UIButtonTypeCustom];
    self.BTNBTN = BTNBTN;
    [self.ContentV addSubview:BTNBTN];
    [BTNBTN addTarget:self action:@selector(ImgVClick) forControlEvents:UIControlEventTouchUpInside];
}

- (void)SetupFrame {
    self.ContentV.frame = self.bounds;
    self.TitleLab.frame = CGRectMake(15, 30-10, 120, 20);
    self.ImgV.frame = CGRectMake(CGRectGetMaxX(self.bounds)-28, CGRectGetMinY(self.TitleLab.frame) + 4, 12, 12);
    self.BTNBTN.frame = self.bounds;
}


#pragma mark ==== 事件处理


-(void)GiftDismiss {

}

- (void)ImgVClick {
    if (self.ClcikBlock) {
        self.ClcikBlock(@"");
    }
}


@end
